$OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.1 2017/04/24 15:25:49 kurt Exp $
--- hotspot/src/os/bsd/vm/os_bsd.cpp.orig	Wed Feb  1 16:16:01 2017
+++ hotspot/src/os/bsd/vm/os_bsd.cpp	Mon Apr 24 09:54:27 2017
@@ -311,6 +311,8 @@ void os::Bsd::initialize_system_info() {
 
 #if defined (HW_MEMSIZE) // Apple
   mib[1] = HW_MEMSIZE;
+#elif defined(HW_PHYSMEM64) // OpenBSD & NetBSD
+  mib[1] = HW_PHYSMEM64;
 #elif defined(HW_PHYSMEM) // Most of BSD
   mib[1] = HW_PHYSMEM;
 #elif defined(HW_REALMEM) // Old FreeBSD
